package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.foundation.store.bean.user.GetPersonalInfoResBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;

public class egl extends egf {
    protected cvt ˎ() {
        return new cgh();
    }

    protected cvt ˋ(int i) {
        return new efw(i);
    }

    protected int ॱ(BaseRequest o_cvu, ResponseBean responseBean, int i) {
        int ॱ = ॱ();
        if (responseBean.getRtnCode_() != 0 || responseBean.getResponseCode() != 0) {
            Logger.ˋ("PushSwitchManager", "error to getSwitchStatusCode, retCode = " + responseBean.getRtnCode_() + ", resCode = " + responseBean.getResponseCode());
        } else if (i == 0 && (o_cvu instanceof cgh)) {
            UserSession.getInstance().setPushOpen(false);
            ॱ = ((GetPersonalInfoResBean) responseBean).ͺ();
            ˊ(ॱ);
            if (ॱ == 0) {
                UserSession.getInstance().setPushOpen(false);
            } else if (ॱ == 1) {
                UserSession.getInstance().setPushOpen(true);
            }
        } else if (i == 1 && (o_cvu instanceof efw)) {
            ॱ = ((efw) o_cvu).ॱ();
            ˊ(ॱ);
            if (ॱ == 0) {
                UserSession.getInstance().setPushOpen(false);
            } else if (ॱ == 1) {
                UserSession.getInstance().setPushOpen(true);
            }
        }
        return ॱ;
    }
}
